package com.itrip.common;

import org.apache.solr.client.solrj.SolrServer;
import org.apache.solr.client.solrj.impl.HttpSolrServer;
import org.apache.solr.client.solrj.impl.XMLResponseParser;

public class SolrUtils {
    private final static String SOLR_URL = "http://127.0.0.1:8080/solr/hotel";
    public  static SolrServer solrServer  = new HttpSolrServer(SOLR_URL,null,new XMLResponseParser());

    public static SolrServer getSolrConnect(){
        return new HttpSolrServer(SolrUtils.SOLR_URL);
    }
    public static void solrServerStop(SolrServer solrServer){
        if(solrServer!=null){
            solrServer.shutdown();
        }
    }
}
